package com.aaa.fees.controller.api;

import com.aaa.entity.Backfee;
import com.aaa.entity.BackfeeItem;
import com.aaa.fees.service.BackfeesService;
import com.aaa.fees.service.BcakfeesItemService;
import com.aaa.fees.vo.BackfeeVo;
import com.aaa.vo.Result;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("fees/api/backfees")
public class ApiBackfeesController {
    @Autowired
    private BackfeesService backfeesService;
    @Autowired
    private BcakfeesItemService bcakfeesItemService;
    // 详细查看
    @GetMapping("/item/{backId}")
    public List<BackfeeItem> getItem(@PathVariable  String backId){
        return bcakfeesItemService.getBackfeesItem(backId);
    }

   // 条件查询，分页  ， 退费页面
    @PostMapping("/infoBackfee/{currentPage}/{pageSize}")
    public Result<IPage<Backfee>> getinfoBackfee(
            @PathVariable Integer currentPage,
            @PathVariable Integer pageSize,
            @RequestBody BackfeeVo backfeeVo
            ){
        return backfeesService.getinfoBackfee(currentPage,pageSize,backfeeVo);
    }
}
